New Efficient Algorithms for LCS and Constrained LCS Problem

نویسندگان

  • Costas S. Iliopoulos
  • Sohel Rahman
چکیده

In this paper, we study the classic and well-studied longest common subsequence (LCS) problem and a recent variant of it namely constrained LCS (CLCS) problem. In CLCS, the computed LCS must also be a supersequence of a third given string. In this paper, we first present an efficient algorithm for the traditional LCS problem that runs in O(R log log n + n) time, where R is the total number of ordered pairs of positions at which the two strings match and n is the length of the two given strings. Then, using this algorithm, we devise an algorithm for the CLCS problem having time complexity O(pR log log n + n) in the worst case, where p is the length of the third string. Note that, if R = o(n), our algorithm will perform very well but, if R = O(n), then, due to the log log n term, our algorithms will behave slightly worse than the existing algorithms.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

New efficient algorithms for the LCS and constrained LCS problems

In this paper, we study the classic and well-studied longest common subsequence (LCS) problem and a recent variant of it, namely the constrained LCS (CLCS) problem. In the CLCS problem, the computed LCS must also be a supersequence of a third given string. In this paper, we first present an efficient algorithm for the traditional LCS problem that runs in O(R log logn+ n) time, where R is the to...

متن کامل

Efficient Polynomial-Time Algorithms for Variants of the Multiple Constrained LCS Problem

In this paper, we revisit a recent variant of the longest common subsequence problem, the string-excluding constrained LCS (STR-EC-LCS) problem, which was first addressed by Chen and Chao [Journal of Combinatorial Optimization, 21(3), 2011]. Given two sequences X and Y of lengths n and m, respectively, and a constraint string P of length r, we are to find a common subsequence Z of X and Y which...

متن کامل

Algorithms for Computing Variants of the Longest Common Subsequence Problem ? ( Extended

The longest common subsequence(LCS) problem is one of the classical and wellstudied problems in computer science. The computation of the LCS is a frequent task in DNA sequence analysis, and has applications to genetics and molecular biology. In this paper we define new variants, introducing the notion of gap-constraints in LCS problem and present efficient algorithms to solve them. The new vari...

متن کامل

Quadratic-time Algorithm for the String Constrained LCS Problem

The problem of finding a longest common subsequence of two main sequences with some constraint that must be a substring of the result (STR-IC-LCS) was formulated recently. It is a variant of the constrained longest common subsequence problem. As the known algorithms for the STR-IC-LCS problem are cubic-time, the presented quadratic-time algorithm is significantly faster.

متن کامل

Variants of Constrained Longest Common Subsequence

In this work, we consider a variant of the classical Longest Common Subsequence problem called Doubly-Constrained Longest Common Subsequence (DC-LCS). Given two strings s1 and s2 over an alphabet Σ, a set Cs of strings, and a function Co : Σ → N , the DC-LCS problem consists in finding the longest subsequence s of s1 and s2 such that s is a supersequence of all the strings in Cs and such that t...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007